var mySwiper = new Swiper('.swiper', {
    direction: 'vertical', // 垂直切换选项
    loop: false, // 循环模式选项

    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination',
    },
    mousewheel: true,
    // 如果需要前进后退按钮
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    },

    // 如果需要滚动条
    scrollbar: {
        el: '.swiper-scrollbar',
    },
})

var options = {
    useEasing: true,  // 过渡动画效果，默认ture
    useGrouping: false,  // 千分位效果，例：1000->1,000。默认true
    separator: ',',   // 使用千分位时分割符号
    decimal: '.',   // 小数位分割符号
    prefix: '',    // 前置符号
    suffix: ''    // 后置符号，可汉字
}
var num = new CountUp('yearNumer', 1992, 2021, 0, 5, options);

$("#index").click(function(){
    $("#yearNumer").css("opacity","1").addClass("animated fadeInLeftBig");
    $("#titText").css("opacity","1").addClass("animated fadeInRightBig")
    $('#yearNumer').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
        num.start();
    });
})



var summaryClickTime = 0; // 点击的次数
$("#summary").click(function(){
    var $p = $("#summary .sumPage").find("p");
    $p.eq(summaryClickTime).css("opacity","1").addClass("animated flipInX");
    summaryClickTime ++;
})

var expectClickTime = 0; // 点击次数
$("#expect").click(function(){
    var $p = $("#expect .sumPage").find("p");
    $p.eq(expectClickTime).css("opacity","1").addClass("animated lightSpeedIn");
    expectClickTime ++;
})

var thanksClickTime = 0;// 点击次数
$("#thanks").click(function(){
    console.log("点击了")
    var $p = $("#thanks .sumPage").find("p");
    if(thanksClickTime == 0){
        $p.eq(thanksClickTime).css("opacity","1").addClass("animated pulse");
    }else{
        $p.eq(thanksClickTime).css("opacity","1").addClass("animated fadeInUpBig");
    }
    thanksClickTime ++;
})
// 重新初始化
function setInit(){

}